﻿using UnityEngine;
using System.Collections;

[RequireComponent(typeof(MeshFilter))]
public class BoundsDrawer : MonoBehaviour {

    public void OnDrawGizmosSelected() {
        MeshFilter filter = this.GetComponent<MeshFilter>();
        Bounds bounds = filter.mesh.bounds;

        Gizmos.DrawWireCube(this.transform.position+bounds.center, bounds.size);
    }
}
